#ifndef PWINDOWAFFINETOOL_H_PPOXZNMWQDDB
#define PWINDOWAFFINETOOL_H_PPOXZNMWQDDB


#include "../../../../kegui_global.h"


#include <QWidget>
#include <QPaintEvent>
#include <QVBoxLayout>
#include <QFont>
#include <QPointF>


namespace kepen {
namespace core {

class KEGUI_EXPORT PWindowAffineTool : public QWidget
{
    Q_OBJECT
public:
    explicit PWindowAffineTool(QWidget *parent,int checkedId, QFont &thirdIconFont);
     ~PWindowAffineTool();
public Q_SLOTS:
    void timeoutClose();
protected:

    void mouseMoveEvent(QMouseEvent *event) override;
    void mousePressEvent(QMouseEvent *event) override;
    void mouseReleaseEvent(QMouseEvent *event) override;
    void paintEvent(QPaintEvent *) override;
private:
    int getIdOfTouched(const QPointF &point);
    void onPaintButtons(QPainter *painter,const  QSize &rectWin);
private:
    bool isMouseLeftDown;
    const  int m_IdChecked;

    int m_nIdTouchedDown,m_nIdMouseOver;
    int idMenuArray[4];
    QPointF ptDown;
    QFont &thirdFontIcon;
Q_SIGNALS:
    void selectedAffineToolSignals(QWidget *dlg,int id);
};

}
}
#endif // PWINDOWAFFINETOOL_H
